package com.model.rule;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.vs.crawl.news.WriteCrawler;

/**
 * *********************************************
 * @author Administrator
 * @FileName Rule.java
 * @Description写入规则
 **********************************************
 */
public abstract class FileRule {
	public static final Logger LOG = LoggerFactory.getLogger(FileRule.class);
	
	private WriteCrawler writeCrawler;
	private String value;
	
	public String getValue() {
		return value;
	}

	public WriteCrawler getWriteCrawler() {
		return writeCrawler;
	}

	public void setWriteCrawler(WriteCrawler writeCrawler) {
		this.writeCrawler = writeCrawler;
	}

	public void setValue(String value) {
		this.value = value;
	}

	/*--------------------------------------------------------------------------------------------*/
	/**
	 * 文件写入规则
	 * 设置两种规则
	 * 1、线程返回数据满多少条就写入
	 * 2、线程返回数据满多少KB就写入
	 */
	public abstract void executeFileRule() ;

}
